In the relentless drive to improve computer performance, there is a growing interest in designing computer systems that can recover spontaneously from errors generated by the various components of the system. In particular, there is interest in building and testing error recovery systems that can respond to errors generated by devices connected along a bus that communicate with a host processor through one or more host bus adapters. Examples of such devices include data storage devices such as hard disc drives, CD ROM drives, and DVD drives. The ability to handle errors generated by such devices has been difficult to test because the devices are highly reliable and as such do not generate errors frequently enough to make testing efficient.
To improve testing efficiency, it has been proposed that these devices generate errors on demand. Ideally, such devices should be able to operate in two modes, one in which false errors can be generated on demand and one in which the device operates properly. In addition, the device should be able to seamlessly move between these two operating modes. This requires some care, because the generation of errors can render inoperable the interface used to instruct the device to return to the proper operating mode.
A device was designed by the Assignee of the present application that was able to generate false errors on a serial fiber-channel bus. However, the types of errors that could be generated were limited. For example, although the Fiber Channel device was able to simulate a command timeout error by ignoring a command, it was not able to perform part of a command and then timeout before finishing the command. Additionally, data miscompare errors where the data that is returned during a read operation is corrupted could not be artificially produced on the Fiber Channel device. The Fiber Channel device also had a limited ability to return specific sense data that indicated details of an error because it did not allow the requester of the error to designate sense data from the full range of possible sense data that can be returned during normal operations. In addition, the design of the Fiber Channel device was specific to the Fiber Channel Interface and did not provide an implementation of false error generation on a device that communicates across a small computer system interface parallel bus.
Embodiments of the present invention provide solutions to these and other problems, and offer other advantages over the prior art.